// BigInt: 大整形 普通整形后面加上n
let n = 521n;
console.log(n, typeof n);

// 将普通整形转换成大整形: 浮点数不行
let n2 = 123;
let n3 = "123";
let n4 = 122.3;
console.log(BigInt(n2));
console.log(BigInt(n3));
// console.log(BigInt(n4)); // Error

// 主要用于大数值运算
let max = Number.MAX_SAFE_INTEGER;
console.log(max + 1);
console.log(max + 2);
console.log(max + 10);